import Vue from 'vue'
import Router from 'vue-router'
import Main from './views/Main.vue'
import Login from './views/Login.vue'
import Welcome from './views/Welcome.vue'
import User from './views/user/User.vue'
import Useradd from './views/user/Useradd.vue'
import Video from './views/video/video.vue'
Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'login',
      component: Login
    },
   {
     path:'/main',
     name:'main',
     component:Main,
     children:[
      {
        path:'/',
        redirect:"/welcome"
      },
      {
        path:'/welcome',
        name:"welcome",
        component:Welcome
      },
      {
        path:'/useradd',
        name:"useradd",
        component:Useradd
      },
      {
        path:'/user',
        name:"user",
        component:User
      },
      {
        path:'/video',
        name:"video",
        component:Video
      },
     ]
   }
  ]
})
